<template>
  <div>
    <nuxt />
    <footerComponent />
    <toTop />
  </div>
</template>
<script>
  import footerComponent from '@/components/footerInfo';
  import toTop from '@/components/toTop';
  export default {
    components:{
      footerComponent,
      toTop
    },
    mounted(){

      var _hmt = _hmt || [];
      this.baiduHm()
      this.zz();
    },
    created(){

    },
    methods:{
      baiduHm(){
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?77991da6bc0ca45cd20906754d022e03";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      },
      zz(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
          bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
          bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
      }
    },

  }
</script>
<style>
  .back-top{
    width: 0.5rem;
    height:0.5rem;
    background: rgba(0,0,0,.5);
    color:#fff;
    border-radius: 50%;
    position: fixed;
    bottom:1rem;
    right:0.2rem;
    font-size: 0.15rem;
    line-height: 0.5rem;
    text-align: center;
    cursor: pointer;
  }
  .back-top:hover{
    background: #006938;
    transition: background-color 1s;
  }

</style>
